home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3167 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  992 b 

  1. Path: sundog.tiac.net!usenet
  2. From: dmorin@tiac.net (Duane Morin)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help!
  5. Date: Fri, 26 Jan 1996 16:12:07 GMT
  6. Organization: The Internet Access Company
  7. Message-ID: <4eaua4$9r3@sundog.tiac.net>
  8. References: <4ea5p4$j0s@ratree.psu.ac.th>
  9. NNTP-Posting-Host: 206.119.56.19
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. s3610165@maliwan.psu.ac.th (Sanon CHAOCHAIYAPORN) wrote:
  13. >    There is a file, hi.bat, in my 'h:\data' directory and I try to 
  14. >run it by C program but it fail. Please, advice to me?
  15.  
  16. >system("hi.bat");
  17.  
  18. In DOS you can't system directly to a batch file like that, you can to
  19. call the command interpreter as well.  Try this:
  20.  
  21. system("command /c hi.bat");
  22.  
  23. see if that works.  
  24.  
  25. Duane
  26.  
  27. ========================================================
  28. Views and opinions expressed above are mine and do not 
  29. necessarily reflect those of my employer.
  30. http://www.tiac.net/users/dmorin/ <-- A real "home" page
  31. ========================================================
  32.  
  33.